home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 25 / Cream of the Crop 25.iso / utility / ffe101.zip / MOD.SWG / 0019_PS16.pas < prev    next >
Pascal/Delphi Source File  |  1996-09-04  |  5KB  |  86 lines

  1. --------M-PS16------------------------------
  2.  
  3. The  Protracker Studio 16 Modules are  yet another digital music format.
  4. The  Protracker  modules  can have up  to  255  different patterns and a
  5. length  of up to 255 patterns with  31 instruments. The samples can only
  6. have a size of up to 64K, there is a maximum of 16 tracks supported. The
  7. header of each MOD file looks like this :
  8.  
  9. OFFSET              Count TYPE   Description
  10. 0000h                   5 char   Header string
  11.                                  ID='PS16',254
  12. 0005h                  75 char   Song name, ending with ^Z so that if typing
  13.                                  the file will result in PS16 <SongName>
  14. 0050h                   1 byte   File type :
  15.                                   0 - Module with patterns and samples
  16.                                   1 - Song with patterns but without samples
  17. 0051h                   1 dword  Offset of comment field from start of file.
  18.                                  Zero if no commend is stored.
  19. 0055h                   1 byte   Format version byte (0)
  20. 0056h                   1 byte   Number of patterns in the file
  21.                                  ="PAT"
  22. 0057h                   1 dword  Total size of all patterns in bytes, stored
  23.                                  for quick disk reads.
  24. 005Bh                   1 byte   Songlength, number of sequences.
  25. 005Ch                 128 byte   Sequencing information for file
  26. 00CCh                  31 rec    Sample information
  27.                         1 byte   Sample flags, bitmapped :
  28.                                    0 - synthesized / digital
  29.                                    1 - Waveform / FM
  30.                                        (only if bit 0 is set)
  31.                                    2 - 16 bit / 8 bit
  32.                          1 byte  Default volume for the sample (0-64)
  33.                          1 byte  Sample fine tuning (signed nibble)
  34.                          1 dword Sample length - Protracker does only support
  35.                                  samples with a size less than 64K.
  36.                          1 dword Sample loop start
  37.                          1 dword Sample loop length
  38.                          1 word  Default playback frequency for C2
  39.                                  Can be used to fine tune a sample.
  40. 00CCh+               "PAT" rec   The pattern information
  41.  31*17                           The tracks are stored sequentially after each
  42.                                  other, first all rows of track 1, then all rows
  43.                                  of track 2 and so on.
  44.                         1 word   Pattern size+3, rounded up to a paragraph
  45.                                  boundary.
  46.                         1 byte   Number of rows in pattern
  47.                                  ="ROW"
  48.                     "ROW" rec
  49.                         2 byte   Note information, bitmapped :
  50.                                    0-5 - Note (see table 0005)
  51.                                      6 - Bit 4 of instrument
  52.                                      7 - Compression bit
  53.                                          If this bit not set, there is another
  54.                                          byte following the note record
  55.                                          specifying the row where the next
  56.                                          event takes place - if it is set,
  57.                                          the next note follows immediately.
  58.                                          A track is terminated by a 0FFh byte.
  59.                                   8-11 - Effect bits
  60.                                  12-15 - Bits 0-3 of instrument
  61.                          1 byte  Effect data
  62. 00CCh+                   ? byte  Sample data in delta format
  63.  31*17+                          See algorthm.txt for details.
  64.  ????
  65.  
  66. The comment block contains information about the sample names as well as
  67. some comments to the module. It is formatted like this :
  68.  
  69. OFFSET              Count TYPE   Description
  70. 0000h                   4 char   ID='INST'
  71.                         1 byte   Instrument name length
  72.                                  ="LEN"
  73.                         1 byte   Sample name count
  74.                                  ="CNT"
  75.               "LEN"*"CNT" char   Sample names
  76. 0000h+                  4 char   ID='TEXT'
  77.  "LEN"*"CNT"+4
  78.                         1 word   Length of following text
  79. EXTENSION:MOD
  80. OCCURENCES:PC
  81. PROGRAMS:Protracker
  82. REFERENCE:
  83. SEE ALSO:DMF,MOD,S3M,STM
  84. VALIDATION:
  85.  
  86.